import Login from '@/views/login.vue'
import Home from '@/views/main.vue'
import Frame from '@/views/frame'
export default[
  {
    path: '/',
    name: '后台管理系统',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login,
    meta: {
      title: '技术库项目资源管理系统'
    }
  },
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [{
      path: '/dashboard',
      name: 'Dashboard',
      meta: {
        title: '首页'
      },
      component: (resolve) => require(['@/views/pages/console.vue'], resolve)
    },
    {
      path: '/rotot',
      name: 'App',
      component: Frame,
      children: [{
        path: 'info',
        name: 'RobotInfo',
        meta: {
          title: '机器人信息'
        },
        component: (resolve) => require(['@/views/pages/robot/info.vue'], resolve)
      },
      {
        path: 'chat',
        name: 'RobotChat',
        meta: {
          title: '智能聊天'
        },
        component: (resolve) => require(['@/views/pages/robot/chat.vue'], resolve)
      },
      {
        path: 'dev',
        name: 'RobotDev',
        meta: {
          title: '开发者选项'
        },
        component: (resolve) => require(['@/views/pages/robot/dev.vue'], resolve)
      }]
    },
    {
      path: '/subscribe',
      name: 'App',
      component: Frame,
      children: [{
        path: 'subscribe',
        name: 'Subscribe',
        meta: {
          title: '订阅管理'
        },
        component: (resolve) => require(['@/views/pages/applied/index.vue'], resolve)
      }]
    },
    {
      path: '/weibo',
      name: 'Weibo',
      component: Frame,
      children: [{
        path: 'list',
        name: 'WeiboList',
        meta: {
          title: '订阅管理'
        },
        component: (resolve) => require(['@/views/pages/weibo/list.vue'], resolve)
      }]
    },
    {
      path: '/app',
      name: 'App',
      component: Frame,
      children: [{
        path: 'manager',
        name: 'AppManager',
        meta: {
          title: '应用管理'
        },
        component: (resolve) => require(['@/views/pages/applied/index.vue'], resolve)
      }]
    },
    {
      path: '/setting',
      name: 'Setting',
      component: Frame,
      children: [{
        path: 'menu',
        name: 'Menu',
        meta: {
          title: '菜单管理'
        },
        component: (resolve) => require(['@/views/pages/setting/menu.vue'], resolve)
      },
      {
        path: 'system',
        name: 'System',
        meta: {
          title: '系统配置'
        },
        component: (resolve) => require(['@/views/pages/setting/system.vue'], resolve)
      }]
    },
    {
      path: '/console',
      name: 'Console',
      meta: {
        title: '测试页面'
      },
      component: (resolve) => require(['@/views/pages/console.vue'], resolve)
    }]
  }
]
